﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 类别信息表
	/// </summary>
	public class DbClass
	{ 
		#region DbClass
		/// <summary>
		/// 
		/// </summary>
		public DbClass()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbClass(Int32 cId)
		{
			this.cId = cId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbClass(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["cId"]),out cId);
			this.cName = Convert.ToString(dr["cName"]);
			int.TryParse(Convert.ToString(dr["cUpId"]),out cUpId);
			this.cPic = Convert.ToString(dr["cPic"]);
			this.cNote = Convert.ToString(dr["cNote"]);
			this.cKeywords = Convert.ToString(dr["cKeywords"]);
			this.cDescription = Convert.ToString(dr["cDescription"]);
			int.TryParse(Convert.ToString(dr["cStatus"]),out cStatus);
			int.TryParse(Convert.ToString(dr["cOrder"]),out cOrder);
			if(dr["cDatetime"] != DBNull.Value)
				this.cDatetime = Convert.ToDateTime(dr["cDatetime"]);
			this.cType = Convert.ToInt16(dr["cType"]);
			int.TryParse(Convert.ToString(dr["cLevel"]),out cLevel);
			this.cAllClassIds = Convert.ToString(dr["cAllClassIds"]);
			this.cBgImg = Convert.ToString(dr["cBgImg"]);
			
		}
		#endregion
		
		
		#region CId
		private Int32 cId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 CId
		{
			get{ return cId; }
			set{ cId= value; }
		}
		#endregion
		
		#region CName
		private System.String cName;
		/// <summary>	 
		/// 类别名称
		/// </summary>
		public System.String CName
		{
			get{ return cName; }
			set{ cName= value; }
		}
		#endregion
		
		#region CUpId
		private Int32 cUpId;
		/// <summary>	 
		/// 上级类别Id
		/// </summary>
		public Int32 CUpId
		{
			get{ return cUpId; }
			set{ cUpId= value; }
		}
		#endregion
		
		#region CPic
		private System.String cPic;
		/// <summary>	 
		/// 类别略图
		/// </summary>
		public System.String CPic
		{
			get{ return cPic; }
			set{ cPic= value; }
		}
		#endregion
		
		#region CNote
		private System.String cNote;
		/// <summary>	 
		/// 类别备注
		/// </summary>
		public System.String CNote
		{
			get{ return cNote; }
			set{ cNote= value; }
		}
		#endregion
		
		#region CKeywords
		private System.String cKeywords;
		/// <summary>	 
		/// 关键词
		/// </summary>
		public System.String CKeywords
		{
			get{ return cKeywords; }
			set{ cKeywords= value; }
		}
		#endregion
		
		#region CDescription
		private System.String cDescription;
		/// <summary>	 
		/// 描述
		/// </summary>
		public System.String CDescription
		{
			get{ return cDescription; }
			set{ cDescription= value; }
		}
		#endregion
		
		#region CStatus
		private Int32 cStatus;
		/// <summary>	 
		/// 类别状态
		/// </summary>
		public Int32 CStatus
		{
			get{ return cStatus; }
			set{ cStatus= value; }
		}
		#endregion
		
		#region COrder
		private Int32 cOrder;
		/// <summary>	 
		/// 类别排序
		/// </summary>
		public Int32 COrder
		{
			get{ return cOrder; }
			set{ cOrder= value; }
		}
		#endregion
		
		#region CDatetime
		private DateTime cDatetime;
		/// <summary>	 
		/// 操作时间
		/// </summary>
		public DateTime CDatetime
		{
			get{ return cDatetime; }
			set{ cDatetime= value; }
		}
		#endregion
		
		#region CType
		private Int16 cType;
		/// <summary>	 
		/// 类别类型
		/// 0-文章类 1-产品类
		/// </summary>
		public Int16 CType
		{
			get{ return cType; }
			set{ cType= value; }
		}
		#endregion
		
		#region CLevel
		private Int32 cLevel;
		/// <summary>	 
		/// 类别层级
		/// </summary>
		public Int32 CLevel
		{
			get{ return cLevel; }
			set{ cLevel= value; }
		}
		#endregion
		
		#region CAllClassIds
		private System.String cAllClassIds;
		/// <summary>	 
		/// 所有父类ID
		/// </summary>
		public System.String CAllClassIds
		{
			get{ return cAllClassIds; }
			set{ cAllClassIds= value; }
		}
		#endregion
		
		#region CBgImg
		private System.String cBgImg;
		/// <summary>	 
		/// 类别背景图
		/// </summary>
		public System.String CBgImg
		{
			get{ return cBgImg; }
			set{ cBgImg= value; }
		}
		#endregion

	}
}
